package cn.javass.dp.abstractfactory.example2;

public class ComputerEngineer {

    private CPUApi cpu = null;

    private MainboradApi mainborad = null;

    //装机
    public void makeComputer(AbstractFactory schema) {
        //1准备好装机的组件
        prepareHardwares(schema);

        //2组装机器
        //3测试机器
        //4交付客户
    }

    private void prepareHardwares(AbstractFactory schema) {
        cpu = schema.createCPUApi();
        mainborad = schema.createMainboradApi();
        cpu.calculate();
        mainborad.installCPU();

    }

}
